package com.designmodel.designmodel.OBERRVER_Pattern_观察者模式.service.impl;

import java.util.Observable;
import java.util.Observer;

/**
 * 观察者
 */
public class Progress implements Observer {

	@Override
	public void update(Observable o, Object arg) {
		if((String)arg=="1"){
			Subject subject=(Subject) o;
			System.out.println(subject.getValue());
			System.out.println(o+"---------"+arg);
		}

	}
}
